#!/bin/sh

prefix=/usr/local
sharedir=${prefix}/share
if [ -f ${sharedir}/texmf-dist/tex/latex/auto-greek/updmap.inc ]; then
	grep -vf ${sharedir}/texmf-dist/tex/latex/auto-greek/updmap.inc ${sharedir}/texmf-config/web2c/updmap.cfg > ${sharedir}/texmf-config/web2c/updmap.cfg.swp
	mv ${sharedir}/texmf-config/web2c/updmap.cfg.swp ${sharedir}/texmf-config/web2c/updmap.cfg
	chmod 0444 ${sharedir}/texmf-config/web2c/updmap.cfg
	mv ${sharedir}/texmf-dist/tex/generic/hyphen/hyphen.tex.old ${sharedir}/texmf-dist/tex/generic/hyphen/hyphen.tex

	${prefix}/bin/texhash
	${prefix}/bin/updmap-sys
	${prefix}/bin/fmtutil-sys --byfmt latex
	${prefix}/bin/fmtutil-sys --byfmt pdflatex
fi;
